//
//  PlayerButton.m
//  单例播放Button
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 直到世界的尽头. All rights reserved.
//

#import "PlayerButton.h"
#import "PublicHeader.h"

@interface PlayerButton ()

@end
static PlayerButton *singer = nil;
@implementation PlayerButton

-(UIImageView *)stateImageView
{
    if (!_stateImageView) {
        static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _stateImageView = [[UIImageView alloc] initWithFrame:CGRectMake(FitConstant_XorWidth(2.5), FitConstant_YorHeight(4), 70, 70)];
        _stateImageView.image = [UIImage imageNamed:@"iconfont-bofang"];
    });
    }
    return _stateImageView;
}

+(PlayerButton *)shareButton
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        singer = [PlayerButton buttonWithType:UIButtonTypeCustom];
        singer.frame = CGRectMake(FitConstant_XorWidth(150), FitConstant_YorHeight(667) - 70, 75, 70);
    });
    
    return singer;
}


//-(UIImageView *)playImageView
//{
//    if (!_playImageView) {
//        _playImageView = [[UIImageView alloc] initWithFrame:CGRectMake(2.5, 4, 70, 70)];
//        [self addSubview:_playImageView];
//    }
//    return _playImageView;
//}

- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
    return CGRectMake(FitConstant_XorWidth(2.5), FitConstant_YorHeight(4), 70, 70);
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
}


//-(void)setIsPlay:(BOOL)isPlay
//{
//    _isPlay = isPlay;
//    
////    if (isPlay) {
////        [self.stateImageView removeFromSuperview];
////    }
////    else{
////        [self addSubview:self.stateImageView];
////    }
//}


@end
